package com.woniu.service.imp;/*
 *
 * @author   米雷
 * @Description
 * @Date:create in 17:37 2020-03-24
 *
 * */

import com.woniu.dao.GoodsCollectMapper;
import com.woniu.dto.GoodCollect;
import com.woniu.dto.OrderAndDetail;
import com.woniu.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImp implements GoodsService {
    @Autowired
    GoodsCollectMapper goodsCollectMapper;

    @Override
    public GoodCollect getCollect(Long id)
    {
        return goodsCollectMapper.getCollectByUserId(id);
    }

    @Override
    public String deleteCollect(Long id)
    {
        int i = goodsCollectMapper.deleteByPrimaryKey(id);
        if (i != 0)
        {
            return "删除成功";
        } else
        {
            return "删除失败";
        }
    }




}
